package com.mxy.myapplication2.service;

import android.app.Service;
import android.content.Intent;
import android.content.ServiceConnection;
import android.os.Binder;
import android.os.IBinder;
import android.support.annotation.Nullable;

public class BindService extends Service {


  @Nullable
  @Override
  public IBinder onBind(Intent intent) {
    System.out.println("BindService onBind");
    return new MyBindler();
  }


  @Override
  public void unbindService(ServiceConnection conn) {
    super.unbindService(conn);
    System.out.println("BindService unbindService");
  }

  @Override
  public boolean onUnbind(Intent intent) {
    System.out.println("BindService onUnbind");
    return super.onUnbind(intent);
  }

  @Override
  public void onDestroy() {
    super.onDestroy();
    System.out.println("BindService onDestroy");
  }

  private class MyBindler extends Binder {

  }
}